<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="entity.Prod"  %>
<%@ page import="entity.CarItem" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的购物车</title>
</head>
<body>
<% request.setCharacterEncoding("utf-8"); %>
<a href="home.jsp">继续购物</a>
<table border="1" width=50%>
			<tr>
				<th>商品名称</th>
				<th>数量</th>
				<th>单价</th>
				<th>总价</th>
				<th>操作</th>
			</tr>
			<% List<CarItem> list=(List<CarItem>)session.getAttribute("shopcar"); %>
			<% for(CarItem caritem:list){
			 %>
			<tr>
				<td><%=caritem.getProd().getProdname() %></td>
				<td><%=caritem.getNum() %></td>
				<td><%=caritem.getProd().getPrice() %></td>
				<td>￥<%=caritem.getTotal() %></td>
				<td><a href="delFromCar.jsp?id="">删除</a></td>
			</tr>
			<% } %>
		</table>
</body>
</html>